package cn.yunhe.service;

import cn.yunhe.dao.IAdminDao;
import cn.yunhe.entity.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("adminService")
public class AdminService {

    @Resource(name = "adminDao")
    private IAdminDao adminDao;

    public Admin login(Admin admin){
        return adminDao.login(admin);
    }

    public void register(Admin admin){
        adminDao.register(admin);
    }

    public IAdminDao getAdminDao() {
        return adminDao;
    }

    public void setAdminDao(IAdminDao adminDao) {
        this.adminDao = adminDao;
    }
}
